package com.cary.camerax.demo;

import android.app.Application;

import com.blankj.utilcode.util.Utils;

public class CameraXApplication extends Application {

    private static CameraXApplication INSTANCE;

    public CameraXApplication() {
        INSTANCE = this;
    }

    public static CameraXApplication getInstance() {
        if (INSTANCE != null) {
            return INSTANCE;
        } else {
            INSTANCE = new CameraXApplication();
            INSTANCE.onCreate();
            return INSTANCE;
        }
    }

    @Override
    public void onCreate() {
        super.onCreate();
        INSTANCE = this;
        Utils.init(this);
    }
}